A Generalization of Short-Cut Fusion and its Correctness Proof

نویسنده

  • Patricia Johann
چکیده

Short-cut fusion is a program transformation technique that uses a single, local transformation—called the foldr-build rule—to remove certain intermediate lists from modularly constructed functional programs. Arguments that short-cut fusion is correct typically appeal either to intuition or to “free theorems”—even though the latter have not been known to hold for the languages supporting higherorder polymorphic functions and fixed point recursion in which short-cut fusion is usually applied. In this paper we use Pitts’ recent demonstration that contextual equivalence in such languages is relationally parametric to prove that programs in them which have undergone short-cut fusion are contextually equivalent to their unfused counterparts. For each algebraic data type we then define a generalization of build which constructs substitution instances of its associated data structures, and use Pitts’ techniques to prove the correctness of a contextual equivalence-preserving fusion rule which generalizes short-cut fusion. These rules optimize compositions of functions that uniformly consume algebraic data structures with functions that uniformly produce substitution instances of those data structures. Johann, Patricia (2002) "A Generalization Of Short-Cut Fusion And Its Correctness Proof" HigherOrder and Symbolic Computation, 15, 273–300 Version Of Record Available From www.springer.com A Generalization of Short-Cut Fusion and its Correctness Proof

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Short Cut Fusion: Proved and Improved

Short cut fusion is a particular program transformation technique which uses a single, local transformation — called the foldr-build rule — to remove certain intermediate lists from modularly constructed functional programs. Arguments that short cut fusion is correct typically appeal either to intuition or to “free theorems” — even though the latter have not been known to hold for the languages...

متن کامل

Proving Correctness via Free Theorems

Free theorems feature prominently in the field of program transformation for pure functional languages such as Haskell. However, somewhat disappointingly, the semantic properties of so based transformations are often established only very superficially. This paper is intended as a case study showing how to use the existing theoretical foundations and formal methods for improving the situation. ...

متن کامل

A Semantic Characterisation of the Correctness of a Proof Net

The purpose of this note is to show that the correctness of a multiplicative proof net with mix is equivalent to its semantic correctness: a proof structure is a proof net if and only if its semantic interpretation is a clique, where one given nite coherence space interprets all propositional variables. This is just an example of what can be done with these kinds of semantic techniques; for mor...

متن کامل

Short Cut Fusion of Recursive Programs with Computational Effects

Fusion is the process of improving the efficiency of modularly constructed programs by transforming them into monolithic equivalents. This paper defines a generalization of the standard build combinator which expresses uniform production of functorial contexts containing data of inductive types. It also proves correct a fusion rule which generalizes the fold/ build and fold/buildp rules from th...

متن کامل

A connected multidimensional maximum bisection problem

The maximum graph bisection problem is a well known graph partition problem. The problem has been proven to be NP-hard. In the maximum graph bisection problem it is required that the set of vertices is divided into two partition with equal number of vertices, and the weight of the edge cut is maximal. This work introduces a connected multidimensional generalization of the maximum bisection prob...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:
  • Higher-Order and Symbolic Computation

دوره 15  شماره 

صفحات  -

تاریخ انتشار 2002